import { createRouter, createWebHashHistory } from "vue-router";

import home from "./modules/home";
import company from "./modules/company";
import goods from "./modules/goods";
import project from "./modules/project";
import order from "./modules/order";
import shop from "./modules/shop";
import category from "./modules/category";
import meeting from "./modules/meeting";

const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: "/",
      redirect: "/shopIndex",
    },
    {
      path: "/login",
      name: "login",
      component: () => import("@/views/Login.vue"),
      meta: {
        name: "登录",
      },
    },
    {
      path: "/test",
      name: "test",
      component: () => import("@/views/test/test.vue"),
      meta: {
        name: "test",
      },
    },

    home,
    company,
    category,
    goods,
    project,
    order,
    meeting,
    ...shop,
    
    {
      path: "/:pathMatch(.*)*",
      name: "404",
      component: () => import("@/views/404.vue"),
    },
  ],
});



export default router;
